import java.io.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

public class delNull {
    public static void main(String[] args ) throws IOException {
        int b;
        try (InputStream is = new BufferedInputStream(new FileInputStream("c:/photo.jpg"));
             OutputStream os = new BufferedOutputStream(new FileOutputStream("c:/photocopy1.jpg"));) {
            while ((b = is.read()) != -1 )
                if (((byte) b) != 0 )
                    os.write(b);
        }
        catch (IOException e) {
            System.out.println("An I/O Error Occured. File Not copy");
        }
//        InputStreamReader
        //Collection
        ArrayList li = new ArrayList();
    }
}
